package com.shenmazong.cheat.controller;

import com.shenmazong.cheat.entity.TbExamCheat;
import com.shenmazong.cheat.entity.TbExamCheatType;
import com.shenmazong.cheat.service.ExamCheatService;
import com.shenmazong.utils.ResultResponse;
import com.shenmazong.vo.BatchChooseIdVo;
import com.shenmazong.vo.ListParamVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;


/**
 *controller Qi
 */
@RestController
public class ExamCheatController {

    @Autowired
    private ExamCheatService cheatService;

    //作弊表新增
    @PostMapping("saveExamCheat")
    public ResultResponse saveExamCheat(@RequestBody TbExamCheat tbExamCheat){
        return cheatService.saveExamCheat(tbExamCheat);
    }

    //作弊表批量删除
    @PostMapping("deleteExamCheat")
    public ResultResponse deleteExamCheat(@RequestBody BatchChooseIdVo chooseIdVo){
        return cheatService.deleteExamCheat(chooseIdVo);
    }

    //作弊表修改
    @PostMapping("updateExamCheat")
    public ResultResponse updateExamCheat(@RequestBody TbExamCheat tbExamCheat){
        return cheatService.updateExamCheat(tbExamCheat);
    }

    //作弊表列表
    @PostMapping("listExamCheat")
    public ResultResponse listExamCheat(@RequestBody ListParamVo paramVo){
        return cheatService.listExamCheat(paramVo);
    }

    //根据ID获取作弊表
    @PostMapping("getExamCheat")
    public ResultResponse getExamCheat(@RequestBody TbExamCheat tbExamCheat){
        return cheatService.getExamCheat(tbExamCheat);
    }

    //作弊类型表新增
    @PostMapping("saveExamCheatType")
    public ResultResponse saveExamCheatType(@RequestBody TbExamCheatType tbExamCheatType){
        return cheatService.saveExamCheatType(tbExamCheatType);
    }

    //作弊类型表批量删除
    @PostMapping("deleteExamCheatType")
    public ResultResponse deleteExamCheatType(@RequestBody BatchChooseIdVo chooseIdVo){
        return cheatService.deleteExamCheatType(chooseIdVo);
    }

    //作弊类型表修改
    @PostMapping("updateExamCheatType")
    public ResultResponse updateExamCheatType(@RequestBody TbExamCheatType tbExamCheatType){
        return cheatService.updateExamCheatType(tbExamCheatType);
    }

    //作弊类型表列表
    @PostMapping("listExamCheatType")
    public ResultResponse listExamCheatType(@RequestBody ListParamVo paramVo){
        return cheatService.listExamCheatType(paramVo);
    }

    //获取所有作弊类型
    @PostMapping("listAllExamCheatType")
    public ResultResponse listAllExamCheatType(){
        return cheatService.listAllExamCheatType();
    }
}




